import { create, UseBoundStore, StoreApi } from "zustand";

interface UserStore {
    user: any,
    setUserName: (username: string) => void
}

const userStore = create<UserStore>((set) => ({
    user: {
        username: 'admin'
    },
    setUserName: (username: string) => {
        set((state: any) => {
            return {
                user: {
                    username: username
                }
            }
        })
    }
}));

export default userStore;